<!DOCTYPE html >
<html>
<head>
    <link rel="stylesheet" href="demos.css" type="text/css" media="screen" />
    
    <script type="text/javascript" src="../libraries/RGraph.common.core.js" ></script>
    <script type="text/javascript" src="../libraries/RGraph.common.dynamic.js" ></script>
    <script type="text/javascript" src="../libraries/RGraph.common.tooltips.js" ></script>
    <script type="text/javascript" src="../libraries/RGraph.drawing.yaxis.js" ></script>
    <script type="text/javascript" src="../libraries/RGraph.bar.js" ></script>
    <!--[if lt IE 9]><script src="../excanvas/excanvas.js"></script><![endif]-->

    <title>An example of the drawing API y axis</title>
    
    <meta name="description" content="An example of the drawing API Y axis object" />

</head>
<body>
        
    <h1>An example of the drawing API Y axis</h1>

    <canvas id="cvs" width="600" height="250">[No canvas support]</canvas>

    <script>
        window.onload = function (e)
        {
            var bar = new RGraph.Bar('cvs', [4,6,8,4,5,3,7,5,4,9])
                .Set('noaxes', true)
                .Set('ylabels', false)
                .Set('colors.sequential', true)
                .Set('colors', ['blue','blue','blue','blue','blue','red','red','red','red','red'])
                .Set('gutter.left', 50)
                .Draw();
            
            var yaxes = new RGraph.Drawing.YAxis('cvs', 50)
                .Set('max', 100)
                .Set('title', 'A custom Y axis')
                .Draw();
                
            yaxes.onclick = function (e, obj)
            {
                alert('The Y axis has been clicked!');
            }
                
            yaxes.onmousemove = function (e, obj)
            {
                e.target.style.cursor = 'pointer';
            }
        }
    </script>


    <p>
        <a href="./">&laquo; Back</a>
    </p>

</body>
</html>